




  // 选择分组/批次
const select=(that, e)=>{
    that.setData({
      'page_data.label_id':that.data.label_list[e.currentTarget.id].id,
      show_page_container:false,
    })
  }


  // 清除已选操作内容
const clear=(that)=>{
  let page_data = that.data.page_data
  delete page_data.label_id
  that.setData({
    page_data,
    show_page_container:false,
  })
  }

const add_label=(that,jg_id)=>{
  // console.log('jg_id',jg_id)
  clear(that)  // 清除已选操作内容,因为有可能其选择了关闭的标签
  setTimeout(() => {
    wx.navigateTo({
      url:'/pages/jgs/jg_labels/jg_labels?jg_id=' + jg_id
    })
  }, 100);

}

  module.exports={
    select:select,
    clear:clear,
    add_label:add_label,
  }